Moved validator into its own package