Minor refactoring of source code.