added UI response to restorInv; cleaned up connection logic