Rewrote QueryInsert. Rows now are stored unmodified and are processed during the query building