Show alias and title in header

I'm now passing through a list of the nodes themselves so that freemarker can see the title, etc

I've also done some refactoring to hopefully make stuff a little bit clearer.

Note that this is dependent on pull request https://github.com/nla/amberdb/pull/180