Refactoring social event listeners