Clean up a failed plan

Write the cleanupFailedPlan method. Also add statement to check
if equivalency is not already in the non equivalent states list