Further refactored XMLBuilder