Pic is now divided by grid
Added settings.h dependency
Added parametrization to merge script