move things into more sensible packages. moved normal encoder to test code.