code to fill in a copy of the template
...
par(mfrow) example
make jsCode a list. Something is very slow so back out for now
moved things around
...