Move files to trash on the model thread.
Fixed memory leaks in the model.
Restore the window size and state.