fix bug in query off event.
directives get tpl and tplUrl options.
fix bug with adding templates recursively. Directives were getting compiled twice.