Some cleanup: change new parameter to connect() method from Component* to a boolean flag indicating toplevel. Much easier to explain and less error prone. Modified derived classes and test cases accordingly.