use real code in main.js instead of template code, remove wgt