little Refactoring
Refactoring AngularJS