Cleans up and refactors verify code and adds more specific error messages.
Merge pull request #3 from mikaelbr/verifyCleanup

Cleans up and refactors verify code and adds more specific error message...