Added code to the Button.