Rework the attach/detach buttons into two separate actions.