Modified javascripts to pass jslint exam.