actions and buttons refactoring