Minor refactoring for readability