fix doc and clean visitor code