Use a proper singleton and clear type conversion warnings.

Turned deviceDetails into a proper singleton.
Added explicit type conversions from NSInteger to NSUInteger to clear warnings.