Thanks for the tip! I didn't mind too much about the performance of the keysort dispatch function but I'll definitely give it a look now.