Linted

Removed trailing whitespace and uncessary semicolons.
Added some missing semicolons.
Cleaned up spacing a bit.
Fixed some duplicate variable declarations.