Almost complete the KML file parsing