Make minor adjusments to algorithms