Added new debugging system, getting rid of a global and prepare for debugging class to be added to the plugin.