Made controller a class, got rid of $scope.