Drafting Autotype support
Fixed issues in KPKXmlTreeWriter and Autotype property
Some minor improvements on xml parsing