Improvement of the Visitor pattern