Energy and Matter Cycling in Ecosystems