Some fixes. Added a new feature for inventory.