Polishing of visitors

This PR finished a TODO item.
I think you are right. Thanks a lot for reviewing this code, I can't believe how many bugs I made and we didn't notice during review.