Refactored out MovingObject code