first draft of ktest refactorings, might not pass tests yet
try to fix tests
fix checkstyle errors