Fix issue with unshifted bits
Add control data debug statement
Replace if statement with packet id switch
Fix issue with server reply formatting
Add a basic package.json to handle dependencies