Re-introduce delete(all) / retry(all) from #37

Everything is pretty much the same as in original pull request #37
Hopefully now a little bit cleaner and of course updated to the latest.

Please let me know if you have any questions or comments.