Refactor of the kernel module-to-userspace app protocol.
Looks good, but I haven't fully tested it yet.