Fixed QueryInsert and added some test for it.
Dried test specs a little.