Encoder almost WIP
Merge