- make ccg_list_length returns an int (vs an unsigned int) to make index arithmetic easier
- added more unit test