PDK 5.2.7

Updated the package.json to point to PDK 5.2.7, even though I think
we'll end up pointing to 5.2.2 (maybe I should try that next).
Simplified integration? Hells yes.
Refactoring/fixes