Minor refactoring / cleanup.