NDE Work in progress

The arrayclean in the new IDMemory function is not working... I think.