Added closure support for variant based config.