Some small refactoring changes.