I ended up trying all the doctypes that existed and still i was getting that weird extra code, so i took a closer look at my code and realised that in the top section of my site i had 2 different doctypes competing against each other.
The second doctype a few lines down had the first bit of code saying it was a doctype missing so i didn't notice it at first, so i removed it ran the optimize
html function in expression web and everything is now fine.
Kreeyon