JSLint fixes and tweak style