Reorganises code for maintainability and reusability.

http://cliffmeyers.com/blog/2013/4/21/code-organization-angularjs-javasc
ript
https://medium.com/opinionated-angularjs/scalable-code-organization-in-a
ngularjs-9f01b594bf06