Replace double quotes by single quotes

Also fix some other jshint issues like mixed indentation, trailing
whitespace, etc.