Fix mismatched XML tag and reorder a few things