added some comments and made minor changes to scoreboard.js