Converted to ARC. Changed code format.