Refactoring

-use strict introduced
-vars removed for angular object appending
-changed from $scope approach to 'controller as' approach