Tool for exporting to SQLite.
Some cleanup.