This is currently necessary to get repeatable results when exporting assemblies as a part of a batch process, since the mesh geometry in imported files is not regenerated for export.
This commit finally unifies all main() functions and moves the few remaining application-wide functions where they belong.