Continued refactoring

Removed unnecessary files

Added and abstract query visitor