A bit of refactoring, finished TextDatabase.deleteMediaItem()