Entirely reworked the debug system.