This will call a binary_to_list conversion every time a mold packet is sent. It would be better to do this just once at initialisation and then store the resulting binary in the State.

As we're also concatenating stuff, if there is just a small number of keys, it might be worth adding the entire thing to the State. Then we can avoid two concatenations and one binary_to_list for each mold packet we send - which generally is quite a lot :)