Refactored basic packet stuff to use classes and methods not funcs
More complete processing