Improve type safety of paths map and move message.