Update for PL

Some tweaks and correction
Merge pull request #47 from wz93/patch-2

Update for PL