Refactored TreasureChest to something more generic