Update main.js

- Fix spacing
- Switch from double quotes to single quotes
- Refactor `defineLanguage()` function