Fix format tree relationships

Previously, obsolete (orphaned) nodes were not automatically deleted
from the database.
Redesign objects for free format transmissions
Implement support for various free-form formats
Improve import script