Added delete logic to plugin.
minor bugfixes.
Minor bugfix.