- refactored XML stuff