Improved code style and logic.
Improved code style and logic.

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