XML configuration changed

The order of \<module\> elements defines order of loading of modules. One module can be loaded multiple times (with different configuration, for example.)

Also, code for loading of configuration refactored.