Ground work necessary to get the detail page working (bug 994820)

It doesn't quite work yet, going back to the homepage and hitting back/forward is broken, but we're getting there.