xml loading cleanups