Fix function hoisting bug (firefox) + jslint 50% of app.js
Merge pull request #330 from karma-exchange-org/ui-improv-14-01-24

Fix function hoisting bug (firefox) + jslint 50% of app.js