Refactor for simplicity.