clean up

Better validation than jslint (easier to configure)
Clean up coding style