Simplified the button code.