Refactor Visit recording