optimized feature detection + added html5 doctype