Added general methods to grid

Can now create grid, create sub grid and get grid cell int.