Enabled ARC and refactored code to comply with ARC