Nit/style: declare element variables at the top of main.js.