First cut at a kml refactor