Refactor the ButtonsLogicHandler class