Complete functionality, fixing tmpl is needed