Adding event handlers in the init method