Added error checking for drop endpoint, still needs pretty-ing up