#353 cleaned up javascript jshint errors/warnings and wrong indentation.