Mass and Energy Flow in the Solar Chromosphere and Corona