Added delete to API and tests for it