Final version, with export to DB etc