Update main.js

Update for #12