Cleanups.

Standardize data formats into single functions.
Also better serial debugging.