More refactoring to eliminate code duplication.
Authored by: struanr 2010-03-20
Parent: [r512]
Child: [r514]