Added dual-instance-related code and docs.