Sets functions correctly

Sets cursor of DeleteEntity.
Remove redundant functions.