better error reporting.  made doctype support lowercase.