Refactor activate_button