final touches on multi-instance support, hopefully