refactored AngularJS from server to separate files