Export and refactor from random dungeon generator