Minor bug fixes. Deletion of elements.