The visit function. Removed old code.