Add README and fix main.js to adhere to style guide