TE port

Attempt at porting to TE
Neatness things
Standardized energy report slightly.