Tidy up

I'm not sure if that doctype string is case-sensitive or not.. betting
on yes.
Turn off SQL Debugging

Oops. ;-)
Removing obsolete code

Now that this is checked in, we have a copy in the commit logs, so can
safely delete commented code.