Implemented the generalisation step that nested fusion needs. Now got the count-rev simplification working.