Here's the joiner working better. Fix bug and kill unused code in Flattener.