Modified C++ source files for PBC implementation.