Kli refactor