Converted to modern Objective-C syntax.