Bug fixes and more work on XML Schem