Can specify destDir in config file.
Replaced 'lindex' with 'return' in template procs.