Refactoring and fixing of xml to object mappings