Simply $resource classes and simplify JSON responses