Updated some classes to work with ARC and iOS.