Refactor resources

Simplify resources handling
The original style was taken from this article https://medium.com/opinionated-angularjs/angular-model-objects-with-javascript-classes-2e6a067c73bc. In the original form the return value was a constructor function and thus the name was capitalized. Should we now use lower case naming?