Cleaning up code for different server environments.
Importing to XML file now works.