Modified GridSolver so that the input gets passed directly to the class