Revert "Merge pull request #450 from drkitty/template-and-view-fixes"

This reverts commit 993425fc07eed0caddbb1cfa800587197eaf3a01, reversing
changes made to 63516baaf9a453c3504e7cf54cc4d52c2bfb5df7.