Factoring out the kml code as a separate core module