move variables to top of main.js for good practice