Cleaning the encoder code.