cleanup DM.download and explain callback_onStateChange