Added ability to replace images in nested PPKs, some other improvements