Added support for specifying custom visitors