Refact, moslty around delayed messages handling