Optimize the validator
Merge pull request #162 from Ashrey/dev

Optimize the validator