completed DeleteHandler and added a helper function to format the ObjectId