Xml escaping

Decodes xml escape characters and deletes unused code.