Add a base-class with query helper methods.