lots of jslint corrections mostly semicolons and indentation