Separated the code the links a CompilationUnit to the active TIM into a separate class. This is in preparation for being able to link a file without having to run the detector.