commented code and small changes to gen_dungeons