Can now delete a thread, albeit in a hackish way.

To be cleaned up.