Query9 rework

Here are my propositions to improve the query9 situation.

I implemented all the behaviours we discussed with John-Gee.