Re #799 code cleanup.