refactor so that signals can be directly connected to other signals
and also make use of the weakref module so that the signals will
disconnect automatically and not hold objects in memory forever.