Added JSDocs to Inventory.js, cleaned up code