Misc cleanup. No more duplicate records. Stores to DB first, then generates draw files from the DB.