routines, and provide a more extended API for doing this. Provide an API for debug logging. Audit and clean up the code.