reviewed and cleaned up ccntlv-related code and fixed varlenint encoding,
added one-line comments for all function definitions