Cleanup of debugging functions
Implemented new thingey in persistent listeners and deleted debug function