Fixing two bugs that cancelled each other out exactly.
Adding record of query rules to BackwardStateMachine.
Adding a rough connected components.