Cleaned up scoreboard function.