Cpd integration

Ready for review