Initial refactoring of gpu/.
Runs too fast - now there are ringbuffer wrapping issues.