Proper handling of ISidedInventories

I really need to rewrite that code.