updated validator, fixed some minor issues and made it more readable
Merge pull request #1 from cullophid/master

updated validator, fixed some minor issues and made it more readable