Updated to new communication protocol.

Also moved bluetooth command definitions to bluetoothmanager.