cleaned up static methods for XML stuff