Cleaned up code. Completed loading for inventory.