IMO, all encoders could be simple static functions. I don't see the need to create a multi-hierarchical object here. I think code would be more readable in a flatter structure.