Refactoring listeners