Removes dependency on angular-resource
Refactoring