Tiled Gallery: More template hierarchy.

Templates can now be divided into actual view templates and partials. There are helpers in the layout class for including templates and partials to make things neater.