Make doctype the first thing in document

IE wants it that way. Closes GH-12