Refactoring events binding and unbinding