-depth option
processTemplate() fixes and tests