Cleaned up some logic

-modified controller in js to use  object
-took unecessary references to the controller out of the html