Finished validator and improved performance