Fix unaligned access issues

Note this relies on gcc __attribute__((__packed__)), which some
  non-gcc compilers also support.  Probably ok, could dive deeper
  on supporting other compilers if anyone ever files a bug.
unaligned access fixup
minor comment/style cleanup on prev two commits