XML integration

More XML integration, working on writing default xml config.