Improved KML generation