conform to google JS styleguide (except 4 spaces instead of 2)
bring the other main js files in line with jshint and jscs