CDI-377

Integrating changes proposed by Pete Muir