class library: minor speed improvement to several methods replacing & and >> with bitAnd and rightShift