grids and a lot of small fixes