Add a main.js to control the js logic