Added tests.
Refactored verification into its own class.