Split off loot.js