Added better XML support