Fixed scoreboard serialization

Also, it now uses higher level structures.