Flatten out function calls, remove disabled code.
Simplify reading motion packet and distinguish it more reliably
from the multitouch packet. Fix checking of the motion packet.
Add debugging line.