broke out main.js and common.js into four smaller files