Refactor button handlers to anonymous classes
Fix conflict