Changed how templating is done