Update main.js and puzzle.js