Cleaning up variant context code to ease conversion.