GenericInventory.cs fixes

Please cancel this pull, i've done some cleanup and i will use the deserialization method instead. Also this will messup all on the long run.