Fixed the rogue entries by excluding data which has a null cpid (I may have to relook to see whether that's actually valid data in the first place).

as for the 3 new columns that's not a simple task at all, I haven't looked at those numbers in some time though, so need to think about it.