Various upgrades to tests and some refactoring of WorldManagerUtil.