Some refactoring of KbPraDriver, trying to make it testable