Convert algorithm interface to use simple shared_ptr implementation.