XSD + small improvements