Fixes #64

This PR takes debugging out of the global scope, as well as removing the need for a separate function. Additional cleanup of documentation.