First implementation of MultiInv support. Hasn't been tested yet.