Adding event handler functionality to Button