Clean up XML code

Reformatting and sanitizing XML code