Fixed duplicate bug. Implemented soft delete