Inventory class added in functions file. Getting rid of global variables.