Object-oriented movement code