Moving the action into the button definition.