moving stuff to AlgoAbstract. tests still passing. TODO: evaluate objective in Algo.