Remove non-unique nodes.
Start wiring up templates.