Added new class Grid and tests.