Moved HDI parts to static methods and removed erroneous left over code from lazy copy paste
Moved HDI parts to static methods and removed erroneous left over code from lazy copy paste

volodymyrss/3ML,giacomov/3ML,giacomov/3ML,volodymyrss/3ML