Implemented new algorithms API.