clean up some code
fix cname uniquification for string constants
remove unused parameter
reduce overhead a bit when many string constants have the same cname