missing semicolons, some whitespace, no need to re var things

There were a few semicolons missing.

Some whitespace got removed because i have remove trailing whitespace on in ST2.

There were a couple variables that were being declared twice