Refactored some Dungeon code