Updated randBits to use 32-bit version, since it masks bits off anyway
Added missing bit option to randBits