Visit/Encounter refactoring