Use Text{En,De}coder functions as constructors

and create an instance of each to be used

Fixes #69