Finish cleaning and commenting main.js