Added functionality to delete messages