Refactor movement and tracking path (first step).