How about a base class for these visitors as the code looks very similar?