Refactor Model with angular-restmod