preliminary version of export template insertion. not yet ready.
Merge branch 'master' into tj-outorg
first working version of export template insertion (default template or file
given by user).