This is a monument to all my sins.

This get's pages working again - but this needs to be mostly rewritten..