Add debug and verbose output

This PR adds some debug and verbosity helpers and some debug output.

Please review, @theneikos.