Add jsbeautifier and fix most jshint errors. Customized the jshint
options a bit.