Fixed initialization of cubes

CubeGeometry is deprecated and replaced with BoxGeometry. Fixed initialization of cubes