Changed UInt32 to NSUInteger in a couple of typedefs to avoid 64 bit difficulties.