cleaned up scoreboard code