Refactoring via KPK