Added distance check to speed up construction of the problem
Experimented with non-linear optimization
Fixed import of a solution
Added appropriate scaling of a mask