Using the new API to write arbitrary stuff to the KB
Clearer error message
Using the correct API for KB