Refactoring bitsd.listener