Refactored portions of code
* Now uses a union for the packet
* Also fixed a hex formatting error when printing out the packet.