Algorithms reimplamented to use type_list