Fixed the global initialization
Enable ARC and use some modern ObjC