Rename function "gd" to "cdhist", and few debug.