Documentation, cleanup, and assertions in the dungeon generation code.