Tmp-file is now deleted after using + some style adaptions.
Add functions to modularize index_to_xml().