Add some stuff for adding queries.