Minor refactoring/code clean up.