begin implementing xml support
merge xml support and bugfixes