Factoring out variant creation.