Added the delete function fix some tests
Fixed a error parsing bug