Button refactoring and cleanup