Check in new template for modules, and fix some public function and add comments
Merge remote-tracking branch 'origin/master'