improved XML-loader code, clean up main.cpp