refactored for cleanliness
wip refactor
Refactored declarations to be more ng-style