cleaned up js with jslint