StateMachine added. Library structure added.