Improved Inventory

Improved Inventory and made the code more readable