Added a retain when not using ARC
Fixed some warnings