Put commands in a queue to be processed to avoid messing up the serial
communication
Cast arguments to the correct type
Changes to make server<->hub communication slightly more robust