Improve how inventories are written