Fixed bug, started more work on packet handler.