Adding close frame and tests.  Fixing bugs with encoding of nested described types.