Rewrote painting of grid. Should be running fairly quickly now