Listener refactoring