Only send (S)QUIT on error for registered connections
Move toplev subsystem to its own file