Protocol cleanup

Message format.
JSON as basic message format but not only.