Refactor last visited at check