Mistakes corrected, added class for export registry to .sql files