Cleaning up and allowing for enabling and disabling debug.