Added polygon.py and added comments to grid.py