Refs #3481. Refactored for 1.9.