Minor refactoring for improved readability