refactor file importers and exporters

- File importer and exporter registries use factory objects instead of
check and create function pointers. More script friendly.
- Code cleanup
update block menu item order