New class to manage the cube display

Creating some classes in order to clarify the code and reduce the number
of global variables.