Improved validates and tests