Implementation off the delete function
Added delete method - edited pull request from martindiphoorn
Merge branch 'martindiphoorn-master'