Refactor as pe code review comments.