Cleanup update code