reduced indent levels in validate.js, more comments