First pass on splitting the template