removed whitespace
changed tidy config
saving the DomDocument that resulted from parsing now removes the <doc> document element