Added function to omit invalid unifications.
Added function to exclude functional predicates in creation of reachable matrix.