Added state machine and scene class