Fixed a merge issue that caused some changes to be lost and fixed an issue with the removeDoctypePreamble method.