Refactoring to enhance readability