Rename deallocation method and modify update method.