Refactored some more (the query completer now calls a factory that generates criteiron completers).
Changed tests after refactoring.
Fixes to make tests pass.
Removed redundant mock.