Repaired XML and other code