fixes to packet and test
cleanup packet.  switch printf to logf in test.