Updated the sweeping functions.