Dynamic via-points and improved spatial generalization for online trajectory planning with Dynamic Movement Primitives