Rewrite world to use a hashmap internally