Add jsbeautifier and jshint and fix errors