Cleaning up algorithms.