Update control-main.js and main.js