More AI work - create state tree