Removed unnecessary white-spaces
Minor markup cleanup
Added constructor to energyObject for better styled initialization
Applied jQuery style DOM manipulation
* Separated functionality each works on a wrapper element
* Make wrapper accessible to the outside
* Append to DOM after all work's done