Refactor TreasureGenerator