Complete migrating MoveSegmant() function.