Further cube.h refactoring.