Fix xml
Add issues 34-48 from PJP