Update pk-base.js

Code revisions