Added support for proper deletions, altered admin logic for invalidating permissions and deletions, and refactored a bit.