Added cube class for object-oriented-ness