Fix distance determining for different worlds, and remove dependency on multiverse