Apple code clean up