Tidy-up code, in CubeHelperFunctions and in unit tests.
Refactor rendering code. Use separate D3D/NULL renderers.