Refactored to use UnitScheme in a more compositional fashion.