Add unit tests
Unit tests:
* make $app a global for setup files inclusion
* more documentation
BAC-144: minor JS variable change