Reachability checking added
Remove unused code