alto: simplify encoders and decoders, less exposed types