Ran validate.js through a javascript linter; cleaned up a lot of the formatting.