Support restrictions of simple types
Support any and anyattribute
A few other fixes