Added changes from validate-uncompressed.js

Compressed version of the changes made to validate-uncompressed.js