added a example to show how to write module for CCGS and fixed some bugs for module.