Minor refactoring of code base.