cleaned up variable linkage into seperate linkage analysis pass