Separate the grid and the scheme into two classes