[hddmanager] split in different files, optimize code