Converted to arc. Its the future man. + Fixed some warnings