Made the energy variable a part of the Grid class, rather than having it
bounced around.