Made some modifications to adding items to inventory