Cleaning up export SQL