Implement full and correct button functionality.