Remove remote media files when deleting media
Don't allow in-use profiles to be deleted
Add missing docstrings