remove unused handlers and queues