Moved extensions to algorithm implementation.