Moving templating to fileresource