Added JUnit test for packet class and fixed int encoding bugs, more final variables