State machine class complete