Encoder improvements