More clean-up, slight refactoring.