restangular refactor