Pulled functionality out of make_watertight.cpp and put it into mw_func.cpp.