tests and small fixes for grid parsing.