Minor beautification.
Move data formatting to shared code.
Implement a value cache that can be read via TCP command.