fix lots of encoding/schema bugs; most basic types work.  still need to add
union and array, i think, then add a few tests for more sophisticated
structures (nested records, etc.)