inconsistent template generation from within scope and from command line
There is inconsistency in how the templates are generated from the command line and from the NDScope.get_template()
method. In particular, they are creating templates with different variables set. We should use a common function for template generation for all uses, so that templates are generated consistently.
This is somewhat related to #247