Updated movement code