Refactoring PBC integration