Misc refactor and DSGM_Delay