Improved Inventory.contains() runtime. Added a few comments.