Huge cleanup. Now written in coffeescript with grunt build.

Simplified validation -- validate should simply return true
if valid.