fixed some (but not all) jslint issues