Switched handling to the mux handler
Moved profiling handlers to own file
Created new handler type for testing
Added debug message if debug is enabled