refactored Database.remove, updated references.