Badly refactored the exporting of Location data.