Updated to modern Obj-C