progress towards management of ship energies and some code refactoring to reduce and make more sense