Some modifications to the encoding