Changed the encoder func name to Encode so it can be injected when the package is used within other applications