Renamed index.js to main.js, and added some function shells.