Query Builder refactor (2nd last round)