Now using GridLayout
Preparing the solver