major refactoring
factoring out visitors
stuff