Fix flatloader

With the db init PR I made some last minute tweaks to the xml file loader that I forgot to also do in the flat loader.  I also made a couple of minor housekeeping changes to source agent.