Split query builder and query manager