refactored to separate visitor, filters, etc
added visitor tests