One Brutal Code Merge
I am making progress on this code merge, but it would be easier if there were more useful comments, function headers, and function names that actually describe what the function is really doing for the new things that have been added since the version that I'm merging up from. Sometimes, these things are true. But when they aren't, it's ugly.