Revert back to std library struct module for building packets

Also partial fix for missing type label (temporarily uses hard coded
value that will always be wrong)
Don't attempt to join threads in close method.

Close method is generally called from within one of the threads that was
being joined causing the program to hang.  No need for it anyway.