Added factory methods for initialising the visitors
Removed dead code