Refactoring AngularJS related choko front-end files.

I've made some refactoring on front-end code to mostly add JSDoc comments and document some of the code. There is still one file to go: *controllers.js*. This is much harder to achieve, as it contains most of the front-end logic and thus should probably be splitted in many files.

As commit afeab9b247 made some mutual changes to the *app.js* file that resulted in conflicts, I prefered to make a rebase of my code to roll my changes on top of your code, as this was much easier to do, more organized and resulted in this pull-request beeing able to be merged to master with no effort from your side. That's why I suffixing my branch with "rebase".