Update to avoid using int and use NSInteger and NSUInteger instead.