Client refactoring to make it more AngularJS
More client refactoring to make it more AngularJS