Move procedures principal_cshift and invert_zoom_x each to its own module. Procedure fund and module variable abs_y go with invert_zoom_x.