Do not use (^) in a fold, that's too expensive.

It's not really in a critical path, so it doesn't make a big difference, but it's better not to do it anyway.
Improve the lookup function in query. Not really in the critical path as the lists are small anyway, but it can help sometimes.