Documented grid.py