moved query parser and printer off to their own headers