restructuring templating files