More encoding simplification (closes #27)