Restored the movement code