More refactoring to remove domain-specific processing from synthesizer.