Researching inventory systems, cleaning code