Refactoring of buttons