better prompt matching. Fix some track-mode handling bugs.