Syntax cleanup based on JSlint recommendations