Simplify the code a bit by using linkage predicates.