So I think we should move the `reduce(...)` bit into it's own function, also I think it makes sense to unroll the shift-and-or ops in the reduce and just write them out, it's only 4 ops, and I think it'd be easier to read.