Some more code mostly related to movement.