Moved button-setup code into its own function.