fix code style bugs discoverred by jshint; minify main js and concatenate all js files into one