Energy and Material Flows in Ecosystems