Beginnings of better XML validation (schema support), and cleaning up a few warnings