CPK Refactoring, changes to CpkContentGenerator and CpkEngine mainly, code cleanup