Various cleanups and fixes

Some background:
* da6be6b should be looked into carefully. To me this looked like serious bugs.
* f1e49ba looks big, but is not. It moves the code together into a skv/ directory, so includes can use a properly "namespaced" include <skv/...>, which is then fully implemented in 6668952