Overhaul: Make entry code C++ class, remove old KERNEL cruft