Added commandline option to allow selection of algorithm.