Refactored gpx export