sanity refactor responding to PR comments