Refactor to make code more readable.