Breaking out the verify code into a separate class