View template refactoring session

Looks like you were doing most things along with me, so this is a massive set of merge conflicts. It's probably unusable, I'm just sending for your reference.