Refactoring code for clarity based on feedback.