refactored xml schema generation, some other changes