Wrote initial encoder builder code