Wrote function solve_lsqr() and dz_from_phiprime() that are called in the main iteration loop of optimize_surface_exact.m to make it more modular. It's now easy to understand the structure of optimize_surface_exact.