Match leaflet code style, fix jshint issues.