fix line endings
fix hanging open bracket, and some jshint issues