Change the way the app looks and refactor

This starts porting the strategy to be of using server-side rendered
templates, rather than the client-side mess it currently is (with no
history and all). It's all very simple, so I don't know what to do here.