more cleanup and ARC support