get_q refactor
It gets C9 to pass, but I'm not 100% sure it makes things actually more simple, it might be harder to understand now? Maybe keeping it at the first level of "reduce" (which I thought was very readable) but then not making 2nd order reduces and solving the C9 issue by pulling out the whole for loop into a different function, could be good instead
Anyway, this does still seem to work, I did some rudimentary testing.