got algorithm functionality working again. Still have to rewrite some of them.