Added everything to handle digitizer data. It's untested...