Some refactorings related to a45c1573271b3d8904a09118659c22840fa8054a, refs #605