feedback: Refactor mode handling