Refactoring code for readability.