Move logic from Module to Listener