APY-34 : Refactor encoder

Made enhancments on using.