compiler restructure, eliminate some underscore, fix some bugs