Refactoring branch visitor