Various fixes to use new Schema library