First working version.  Next up: tuning delays.