Greater refactoring to better support Compounds.