More fine-grained control over debugging output, and added preprocessor directives which might be turned into a header-only library.