cleanup:

push common code up in the inheritance tree.
encoder operation stubs
more cleanup
implement BaseEncoder

untested, still WIP. Coverage is down.