Add scene state machine and test it