Dries: Added generating map + writing to XML file