Added serialization and deserialization to commands params.

Modified all Serialization and Deserialization (shared vars and commands).