Fixed delete method
Various minor improvements