Replaced assign_variables() in _parse_template_vars() with a more efficient regular expression. Tweaked the stash tag pair regex to match empty subsequent empty pairs