Clean up scope_to_records a bit, test CPKs