Better encode/decode code for control bus.