Changed grid storage to dict