Refactor, fixes unresolved impl in datagen scenario.