Remove unused imports
Remove _url_for
Fix anonymization of deletes
Code style and formatting cleanups

- Collapsed some long long lines
- Consintently use single quotes everywhere
- Fix some indentation
- Fix some whitespace issues
Rename FIELDS_SET_INTERNALLY to PROTECTED_FIELDS