minor refactoring of movement stuff