Introduce the $resource and replace low level $http