Start of a cube model. Rearranged API a bit.