APY-34 : Refactor encoder

Fixed the using branch.