Algorithms reboot

Here's a big long list of changes, mostly localized to a few new files.