Moved the visitor  implementation in its own namespace.