Cleaned up the test case and getting to the heart of the encoder bugs.