Some cleanup and refactoring in prep for layover-in-motion

Functionally idempodent, and passed all integration tests.