Clean up generic visit handler.