Refs #2626: Just some minor refactoring and code cleanup.