remove unused imports
move filter visitor tests to a separate module
extend filter visitor tests and fix a few minor bugs