Refactor to simplify.