Rebuilt the encoder macros