extract more grid functionality out into own ns