added support for x-www-form-urlencoded variables in template variables and query (q) string