Some style improvements and jshint verification