Cleanup of key_update()