Remove unnecessary xml entries, refactoring