More bug fixes in movement.

Unless some new problem appears, I would call this version of the
movement smoothing good enough to be final.