Added base classes for State Machine
Added State base class and a specific SMController for Cube.