Refactored update/delete methods.