Merge pull request #53 from roydude/v1-train

Change 19198 to use deleteSelectedMessages().
Changed 6029 to use _RESTART_DEVICE instead of deleteAllThreads().