Add delete functionality

Code changes for parser() function better errors management