Changed implementation to make UInt a value class.