Minor tweaks to the KML file writing logic to lessen its size. 
Correct an altitude change bug. 
Remove some dead code. 
Clean up some studio warnings.