Fixed warnings
Added support for saving inventories