Energy and Matter Flow in Ecosystems