Extract code that removes other object