Clean up and refactor the movement code, fix minor translation bugs.