[src/km*.[ch]] add working kmlib components