Added handlers to buttons.