Some encoder stuff added

the code for looking at various encoder outputs is implemented in the
test function