Moved variable declarations to top of scope, and combined into one statement. Added semicolons to end of statements. Changed == to ===