renaming main.js to control.js