Added Method that takes care of register event handlers