Switch all Algo functions to use an option struct