Loading State Machine

State machine functionality and the loading logic from the session
video implemented