Tidied-up code ready for test-run. Required QEI timing moving out to HALF_PERIOD=98