add option for maximum number of nested template calls and variables/params