cleaning up old code leaving client event processing skeleton