Python3 fixes. Also, actually update the grid when changing the size.