Create State Programs
Added all variables and functions for first stateMachine