added tests for Grid and fixed errors