The other main file (aside from implementing some logging infrastructure) defines a ref-counted "context" object with accessors some of which may be sourced from device files, & queries collections via various device files with in-process caching.
2.5/2.5 Fin for today! Tomorrow: KMod commands, then: kernelspace side!