nnnSIM serialization and bug fix completion

This has been bothering me all evening. I have finally been able to finish the
serialization of all the packets we have defined. There were also a couple of
bug fixes that needed to be taken care of in these files so as not to make the
compilation explode.