Rewrote queue action to be more Qt friendly.

More actions like insert are also possible but not implemented yet.
Also rewrote the message serialization to handle nested structs.