Added reachability analysis to delete extra states being generated