Removing repeated variable definition
Adding missing semicolons and using strict equality