New packet handling method

No longer uses a massive switch statement to handle packets, instead
uses a dictionary lookup method.