Made some more improvements to the large query loading code.