Syntax fixes

Syntax fixes as by http://jshint.com suggestions.