Crear/header kb 2

This is #97 rebased,  with testing code and some other cruft removed.