improved code structure

makes the functionality for handling of the HLT data format available for other classes/devices
fixes also the memory corruption problem as the buffers are now better separated