Move cpdf fns to new file
Convert to type-functions
Order fns more naturally