CPK Refactoring, debugging cpf-core