revising main.js basics and compilation