completed refactoring of inventory to use factory Refs #149