[#67] clean up code, add documentation for manage_deletions