Added set-values!, and used it to simplify the movement code.