add a delete management function
#312 solved + clean some comments