Ran it through JSLint and fixed everything.