Revert "with new cardinality files"

This reverts commit 2ca5ce1fec6a2afc65007309dcf04c48f7d1f90e.
Revert "new cardinality.h/.c files"

This reverts commit d79aba17256114b03867271ede814f1853a797a6.