Added a couple fixes

Fixed iOS Ref counting template that could become “nil”
Fixed ARC support, and think I cleaned some items where only the last subs where saved.
Not optimal as I am no Ruby dev, but I think it gets the job done.