Finished movement code