Added delete function to route and db query