AngularJS migration of Model Handler and Repository refactoring