Fixes to Zend application, added tests for Mocha, improved build script