#1 [@paolocarrasco] refactored the main.js file