Fix HTML and add a common.js file