Fixed document encoding, closing elements, obsolete attributes