Moved LinkObject function call to the place where it is first used. Added missing loop labels. Removed commented out and unused code.
Moved LinkObject function call to the place where it is first used. Added missing loop labels. Removed commented out and unused code.

mbeijen/otrs-1,moritz/otrs,thorsteneckel/otrs,muehlbauer/otrs,nilei/otrs,linearregression/otrs,brandonshults01/otrs,capeit-tto/otrs,PortgasDAce/otrs,PortgasDAce/otrs,mbeijen/otrs-1,moritz/otrs,s7design/otrs,crythias/otrs,balazj/otrs,moritz/otrs,PortgasDAce/otrs,balazj/otrs,xhoy/otrs,StCyr/otrs,eliasp/otrs,MBRG/otrs,thorsteneckel/otrs,PortgasDAce/otrs,xhoy/otrs,crythias/otrs,eliasp/otrs,vlascoder/otrs,PortgasDAce/otrs,nilei/otrs,linearregression/otrs,oiami/otrs,linearregression/otrs,mburggraf/otrs,nilei/otrs,crythias/otrs,s7design/otrs,mburggraf/otrs,brandonshults01/otrs,nilei/otrs,mburggraf/otrs,s7design/otrs,MBRG/otrs,thorsteneckel/otrs,rudy500/otrs,oiami/otrs,eliasp/otrs,muehlbauer/otrs,MBRG/otrs,mbeijen/otrs-1,vlascoder/otrs,rudy500/otrs,nilei/otrs,thorsteneckel/otrs,balazj/otrs,s7design/otrs,StCyr/otrs,moritz/otrs,muehlbauer/otrs,StCyr/otrs,muehlbauer/otrs,oiami/otrs,rudy500/otrs,xhoy/otrs,eliasp/otrs,linearregression/otrs,noritnk/otrs,rudy500/otrs,thorsteneckel/otrs,moritz/otrs,mburggraf/otrs,MBRG/otrs,StCyr/otrs,noritnk/otrs,s7design/otrs,xhoy/otrs,balazj/otrs,noritnk/otrs,capeit-tto/otrs,muehlbauer/otrs,brandonshults01/otrs,rudy500/otrs,vlascoder/otrs,oiami/otrs,crythias/otrs,StCyr/otrs,capeit-tto/otrs,MBRG/otrs,brandonshults01/otrs,eliasp/otrs,mburggraf/otrs,oiami/otrs,linearregression/otrs,crythias/otrs,balazj/otrs,xhoy/otrs,brandonshults01/otrs