Working on grid subdivision
Update of code to current status