KF-61: refactoring