Added foundation for the default template, which means a big rewrite