Refactored CubeExp.