Implemented throttling for validation and made few optimizations

it fixes #344