removing $scope dependency from MainCtrl and tests