Replaced $resource with $http again