Adding templating logic in separate file