Implemented tail deletion functionality