Standardize formatting
Change grid_to_string to use generators