Removed the validator function as it was completely pointless and only added complexity.