began working on draft-04 schema support; some refactoring of the draft-03 code