Refactoring query generators so far to account for Kals feedback