Finish refactoring towards using a repository insted of calling $http directly from the controllers. The repository still doesn't do error handling well though.