Converted command messages to use new API, generated using org.json
package