A lot of changes to make it use Angular REST api rather than a lot
of $http calls.