Adding delete functionality to the api