This refactors the page-attribute area a bit and intergrates the new ajax branch of the QC plugin. I'm not really happy about the included file - it should probably be moved to our Template class instead.