Finish the bulk of the button code.