a few tweaks based on jshint