Improved grid_function interface