Optimized the structure, redesign packet class and do some small tests on it.