Fixed some bugs in main class
Did some work on the packet pipeline