Added delete functionality and tests