Updated unit tests; still debugging encoded output