Grid serialization scheme revised

The previous serialization scheme which used plaintext files etc was
scrapped. We now use JSON to serialize and deserialize grids.