Added the ID to the export. Also a few little bug fixes.