Fix some js syntax with the help of jshint