Updated to modern objective-c syntax.