xml format checkings, improved constructors