First commit to fix SMACK-278
Fix for NPE in PacketWriter
Whitespace fixes