Moved algorithm defs from algos.c to each algorithm's file