This script outputs a tidied minimal version of a MapRun course KML file. It assumes the file is structured as a document for the event, containing a folder that contains the course placemarks. It will not work correctly without this structure.
The "Add Styles" option will add an icon to each placemark, using icons from the MapRunners site. These are ignored by the maprun app, but may help when viewing the course in Google Earth to nudge locations.