Ran it through JSHint.com

Cleanup missing var declarations and missing semi-colons.